package pl.iachoo.ctl.tabory.ui.editors.stations;

import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.Section;

import pl.iachoo.ctl.tabory.ui.base.editor.AbstractEditorPart;

public class StationEditor extends AbstractEditorPart<StationSelection> {

	public static final String ID = "pl.iachoo.ctl.tabory.ui.editors.stations.StationEditor";

	public StationEditor() throws Exception {
		super();
	}

	@Override
	protected void initGui(Composite parent) {
		GridLayoutFactory.fillDefaults().numColumns(2).margins(3, 3)
				.applyTo(form.getBody());

		StationsTableSection stationsTableSection = new StationsTableSection(
				form.getBody(), formToolkit, Section.TITLE_BAR);
		GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL)
				.grab(false, true).applyTo(stationsTableSection.getSection());

		StationsDistancesNatNatbleSection stationsDistancesSection = new StationsDistancesNatNatbleSection(
				form.getBody(), formToolkit, Section.TITLE_BAR);
		GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL)
				.grab(true, true)
				.applyTo(stationsDistancesSection.getSection());

	}

	@Override
	protected void postInitGui(Composite parent) {
		// TODO Auto-generated method stub

	}

	@Override
	protected void doSave() throws Exception {
		// TODO Auto-generated method stub

	}

	@Override
	protected void doCancel() throws Exception {
		// TODO Auto-generated method stub

	}

	@Override
	protected StationSelection initSelection() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setFocus() {
		// TODO Auto-generated method stub

	}

}
